<html layout:decorate="~{project/objectManage/object_list}" xmlns:layout="http://www.w3.org/1999/xhtml">
<div layout:fragment="object_list">
    <div class="main-body">
        <div id="toolbar" class="btn-group btn-group-sm " >
            <a type="button" class="btn btn-primary" onclick="editData('/project/objectManage/message_list', 'id')">查看报文数据列表</a>
        </div>
        <table id="dataTable" data-url="/project/objectManage/equipment_data" data-page-list=[]  data-striped="true"
               data-pagination="true" data-page-size="10" data-cache="false" data-toolbar-align="right">
        </table>
        <script>
            var dataFormat_equipment = [{
                checkbox: true
            },{
                field:'id',
                title:'id',
                visible:false
            },{
                field: 'name',
                title: '名称',
                sortable:true
            },{
                field: 'project.name',
                title: '所属项目',
                sortable:true
            }, {
                field: 'equipmentType',
                title: '设备类型',
                formatter : function (value, row, index) {
                    switch (value){
                        case 1:
                            return "变流器";
                        case 2:
                            return "电池包";
                    }
                },
                sortable:true
            }, {
                field: 'communication',
                title: '通信类型',
                sortable:true
            }, {
                field: 'messageName',
                title: '报文配置文件',
                sortable:true
            }];
            window.onload = function () {
                getTable(dataFormat_equipment, "dataTable");
            };
        </script>
    </div>
</div>
</html>

